import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const difineRoutes = []
const routes = [
  {
    path: '/',
    name: 'Home',
    component: () => import('@/views/home/index.vue')
  },
  {
    path: '/productIntroduction',
    name: 'ProductIntroduction',
    component: () => import('@/views/productIntroduction/index.vue')
  },
  {
    path: '/dataSource',
    name: 'DataSource',
    component: () => import('@/views/dataSource/index.vue')
  },
  {
    path: '/demand',
    name: 'Demand',
    component: () => import('@/views/demand/index.vue')
  },
  {
    path: '/openPlatform',
    name: 'OpenPlatform',
    component: () => import('@/views/openPlatform/index.vue')
  },
  {
    path: '/dataService',
    name: 'DataService',
    component: () => import('@/views/dataService/index.vue')
  },
  {
    path: '/usageStatistics',
    name: 'UsageStatistics',
    component: () => import('@/views/usageStatistics/index.vue')
  },
  {
    path: '/setting',
    name: 'SettingPro',
    component: () => import('@/views/setting/index.vue')
  },
  // setting  @/views/setting/index.vue
  {
    path: '/login',
    name: 'Login',
    component: () => import('@/views/login/index.vue')
  },
]

const router = new VueRouter({
  // mode: 'history',
  base: process.env.BASE_URL,
  routes
  // difineRoutes
})

export default router
